package com.h5lib.nchuoffice;

/**
 * 字符串工具
 * @author framer
 *
 */
public class StringUtils {

	
	/**
	 * 截取字符串
	 * @param source
	 * @param leftTag
	 * @param rightTag
	 * @return
	 */
	public static String between(String source,String leftTag,String rightTag){
		int leftIndex = source.indexOf(leftTag);
		int rightIndex = source.indexOf(rightTag,leftIndex+1);
		if(!(rightIndex>leftIndex)){
			return "";
		}
		else{
			return source.substring(leftIndex+1, rightIndex);
		}
	}
	
}
